<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/3/10
 * Time: 22:35
 */

namespace app\index\Validate;


use think\Validate;

class Sale extends Validate
{
    protected $rule = [
        'name'=>'require',
        'price' => 'number',
        'quantity' => 'number|require',
    ];

    protected $message = [
        'name.require' => '名称不能为空',
        'price.number' =>  '单价只能为数字',
        'quantity.number' =>  '数量只能为数字',
        'quantity.require' =>  '数量不能为空',
    ];


}